/**
 * Copyright (C), 2001-2022, www.bosssof.com.cn
 * FileName: BaseCollectionDemo
 * Author: Administrator
 * Date: 2022-10-24 11:46:02
 * Description:
 * <p>
 * History:
 * <author> Administrator
 * <time> 2022-10-24 11:46:02
 * <version> 1.0.0
 * <desc> 用于定义各容器demo用到的公用方法
 */
package com.bosssoft.hr.train.j2se.example.collection;

import com.bosssoft.hr.train.j2se.example.pojo.User;

/**
 * @ClassName: BaseCollectionDemo
 * @Description: 类的主要功能描述
 * @Author: Administrator
 * @Date: 2022-10-24 11:46
 **/
public class BaseCollectionDemo {
    /**
     * 演示数据上限
     */
    private static final int MAX_LOOP_COUNT=10;

    /**
     * @Description: 初始化数据
     * @Author: Administrator
     * @DATE: 2022-10-21  16:11
     */
    protected User[] generateData(){
        User[] users=new User[MAX_LOOP_COUNT];
        for(int i=1;i<=MAX_LOOP_COUNT;i++){
            // 字段较多构建简单字段满足作业要求即可
            users[i]=new User(
                   new Long(i),
                    String.format("BS%03d",i),// 格式化为3位
                    "同学"+i
            );
        }
        return users;
    }
}
